package com.cll.pmis.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.cll.pmis.common.validator.group.Insert;
import io.github.llchen.apidoc.annotation.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 病例
 * </p>
 *
 * @author chenliangliang
 * @since 2018-06-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(description = "病例表")
public class Dossier implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    @NotBlank(message = "用户名不能为空",groups = {Insert.class})
    private String username;

    @NotBlank(message = "性别不能为空",groups = {Insert.class})
    private String sex;

    @NotBlank(message = "名族不能为空",groups = {Insert.class})
    private String nation;

    @NotBlank(message = "邮箱不能为空",groups = {Insert.class})
    private String email;

    @JSONField(serialize = false,deserialize = false)
    @NotBlank(message = "身份证号不能为空",groups = {Insert.class})
    private String idCard;

    @NotBlank(message = "手机号码不能为空",groups = {Insert.class})
    private String phone;

    @NotNull(message = "年龄不能为空",groups = {Insert.class})
    @Min(value = 0L,message = "年龄必须大于等于零",groups = {Insert.class})
    @Max(value = 150L,message = "年龄不超过150岁",groups = {Insert.class})
    private Integer age;

    private String doctor;

    private String address;
    /**
     * 症状
     */
    @NotBlank(message = "症状不能为空",groups = {Insert.class})
    private String symptom;
    /**
     * 诊断结果
     */
    @NotBlank(message = "诊断结果不能为空",groups = {Insert.class})
    private String result;
    /**
     * 备注
     */
    private String remark;

    @JSONField(serialize = false,deserialize = false)
    private Integer isDelete;

    private Date createTime;
    private Date updateTime;

    @TableField(exist = false)
    private List list;

    @TableField(exist = false)
    private Integer orderStatus;

    @TableField(exist = false)
    private String orderId;


}
